﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Medianamik.Core.DAL.SQL
{
    public class UpdateQuery : ISqlQueryPart
    {
        private UpdateFromClause _updateFrom;
        private WhereClause _whereClause;
        public UpdateQuery(UpdateFromClause pUpdateFrom, WhereClause pWhereClause )
        {
            _updateFrom = pUpdateFrom;
            _whereClause = pWhereClause;
        }

        #region ISqlQueryPart Members

        public StringBuilder ToSQL()
        {
            return new StringBuilder()
                .Append(_updateFrom.ToSQL())
                .Append(_whereClause.ToSQL()); 
        }

        #endregion
    }
}
